package com.letian.info.service.impl;

import java.util.List;
import com.letian.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.letian.info.mapper.InfoFeedbackMapper;
import com.letian.info.domain.InfoFeedback;
import com.letian.info.service.IInfoFeedbackService;

/**
 * 反馈信息Service业务层处理
 * 
 * @author bmz
 * @date 2023-04-09
 */
@Service
public class InfoFeedbackServiceImpl implements IInfoFeedbackService 
{
    @Autowired
    private InfoFeedbackMapper infoFeedbackMapper;

    /**
     * 查询反馈信息
     * 
     * @param feedbackId 反馈信息主键
     * @return 反馈信息
     */
    @Override
    public InfoFeedback selectInfoFeedbackByFeedbackId(Long feedbackId)
    {
        return infoFeedbackMapper.selectInfoFeedbackByFeedbackId(feedbackId);
    }

    /**
     * 查询反馈信息列表
     * 
     * @param infoFeedback 反馈信息
     * @return 反馈信息
     */
    @Override
    public List<InfoFeedback> selectInfoFeedbackList(InfoFeedback infoFeedback)
    {
        return infoFeedbackMapper.selectInfoFeedbackList(infoFeedback);
    }

    /**
     * 新增反馈信息
     * 
     * @param infoFeedback 反馈信息
     * @return 结果
     */
    @Override
    public int insertInfoFeedback(InfoFeedback infoFeedback)
    {
        infoFeedback.setCreateTime(DateUtils.getNowDate());
        return infoFeedbackMapper.insertInfoFeedback(infoFeedback);
    }

    /**
     * 修改反馈信息
     * 
     * @param infoFeedback 反馈信息
     * @return 结果
     */
    @Override
    public int updateInfoFeedback(InfoFeedback infoFeedback)
    {
        infoFeedback.setUpdateTime(DateUtils.getNowDate());
        return infoFeedbackMapper.updateInfoFeedback(infoFeedback);
    }

    /**
     * 批量删除反馈信息
     * 
     * @param feedbackIds 需要删除的反馈信息主键
     * @return 结果
     */
    @Override
    public int deleteInfoFeedbackByFeedbackIds(Long[] feedbackIds)
    {
        return infoFeedbackMapper.deleteInfoFeedbackByFeedbackIds(feedbackIds);
    }

    /**
     * 删除反馈信息信息
     * 
     * @param feedbackId 反馈信息主键
     * @return 结果
     */
    @Override
    public int deleteInfoFeedbackByFeedbackId(Long feedbackId)
    {
        return infoFeedbackMapper.deleteInfoFeedbackByFeedbackId(feedbackId);
    }
}
